﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
				 xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"  
             x:Class="SingleFileUpload.App">
	<Application.Resources>
		<Style x:Key="GridStyle" TargetType="Grid">

		</Style>

		<Style x:Key="BorderStyle" TargetType="Border">
		</Style>

		<Style x:Key="ImageButtonStyle" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center">
								<ContentPresenter.Content>
									<Image Source="{TemplateBinding Content}" ></Image>
								</ContentPresenter.Content>
							</ContentPresenter>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Cursor" Value="Hand"/>
		</Style>

		<Style x:Key="BlueButtonStyle" TargetType="Button">
			<Setter Property="Background" Value="#FF4883D4"/>
			<Setter Property="Foreground" Value="#FFFFFF"/>
			<Setter Property="Padding" Value="3"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="Cursor" Value="Hand"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Normal"/>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							<Border x:Name="Background" CornerRadius="0" Background="#FF4883D4" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
								<Grid Background="{TemplateBinding Background}"  Margin="1">
									<Border Opacity="0"  x:Name="BackgroundAnimation" Background="#FF448DCA" />
								</Grid>
							</Border>
							<ContentPresenter x:Name="contentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}"/>
							<Rectangle x:Name="DisabledVisualElement" RadiusX="0" RadiusY="0" Fill="#FFFFFFFF" Opacity="0" IsHitTestVisible="false" />
							<Rectangle x:Name="FocusVisualElement" Margin="0" StrokeThickness="0" Opacity="0" IsHitTestVisible="false" />
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

		<!--<Style x:Key="ProgressBarStyle" TargetType="ProgressBar">
			<Setter Property="Foreground" Value="#FF4883D4"/>
			<Setter Property="Background" Value="#FFFFFF"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="BorderBrush" Value="#FF4883D4"/>
		</Style>-->

		<Style x:Key="ProgressBarStyle" TargetType="ProgressBar">
			<Setter Property="Foreground" Value="#FF4883D4"/>
			<Setter Property="Background" Value="#FFFFFF" />
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Maximum" Value="100" />
			<Setter Property="IsTabStop" Value="False"/>
			<Setter Property="BorderBrush" Value="#FF4883D4"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ProgressBar">
						<Grid x:Name="Root">
							<!--Default Root Visuals for either type of ProgressBar-->
							<Border Name="ProgressBarTrack" CornerRadius="1" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" />
							<Grid x:Name="ProgressBarRootGrid" >
								<!-- Beginning of Gradient over all visuals -->
								<Rectangle Canvas.ZIndex="1" x:Name="ProgressBarRootGradient" StrokeThickness="1" Margin="{TemplateBinding BorderThickness}" Stroke="#FFFFFFFF" RadiusX="1.5" RadiusY="1.5">
								</Rectangle>
								<!-- Beginning of Indeterminate Progress Bar Visuals-->
								<Grid x:Name="IndeterminateRoot" Visibility="Collapsed">
									<Rectangle x:Name="IndeterminateSolidFill" Stroke="#FF4883D4" RadiusX="1" RadiusY="1" StrokeThickness="0" Margin="{TemplateBinding BorderThickness}" Fill="{TemplateBinding Foreground}" Opacity="1" RenderTransformOrigin="0.5,0.5" />
									<Rectangle x:Name="IndeterminateGradientFill" RadiusX="1" RadiusY="1" StrokeThickness="1" Margin="{TemplateBinding BorderThickness}" Opacity="0.7" >
										<Rectangle.Fill>
											<LinearGradientBrush SpreadMethod="Repeat" MappingMode="Absolute" EndPoint="0,1" StartPoint="20,1">
												<LinearGradientBrush.Transform >
													<TransformGroup>
														<TranslateTransform X="0" />
														<SkewTransform AngleX="-30" />
													</TransformGroup>
												</LinearGradientBrush.Transform>
												<GradientStop Color="#FFFFFFFF" Offset="0"/>
												<GradientStop Color="#00FFFFFF" Offset=".25"/>
												<GradientStop Color="#FFFFFFFF" Offset="0.85"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
								</Grid>
								<!-- Beginning of Determinate Progress Bar Visuals-->
								<Grid x:Name="DeterminateRoot" Margin="1" >
									<!--Background -->
									<Rectangle HorizontalAlignment="Left" x:Name="ProgressBarIndicator" Margin="{TemplateBinding BorderThickness}" StrokeThickness="1" RadiusX="1" RadiusY="1" Fill="{TemplateBinding Foreground}"/>
								</Grid>
							</Grid>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

	</Application.Resources>
</Application>
